package org.shangda.wechat.pet.enums;


import com.power.common.interfaces.IMessage;

/**
 * Error code enum
 * @author D1M on 2019/08/09.
 */
public enum ErrorCode implements IMessage {

    SUCCESS("0000", "succeed"),

    PARAM_EMPTY("1001", "必选参数为空"),

    PARAM_ERROR("1002", "参数格式错误"),

    FILE_OUT_MAX_SIZE("1003", "文件太大"),



    MEMBER_EXISTS("2001", "会员已经存在"),

    INVALID_MASTER_DATA_ORIGIN("2002", "会员数据来源错误"),

    MEMBER_NOT_EXISTS("2003", "会员不存在"),

    LOGIN_ERROR("2004", "登录异常"),

    CONFIG_ERROR("2005","配置异常"),

    MEMBER_DECODE_ERROR("2006","会员信息解析失败"),

    PRODUCT_NOT_EXISTS("2007","商品不存在"),

    OPERATE_FREQUENTLY("2008","操作太频繁，请稍后重试"),

    CART_NOT_EXISTS("2009","购物车不存在"),

    CART_NUM_EMPTY("2010","购物车商品数量已经小于等于0了"),

    ERROR_SETTLE_ACCOUNT_TYPE("2011","错误的结算类型"),

    EMPTY_STOCK("2012","库存不足"),

    PRODUCT_DELETED("2013","商品已经被删除"),

    PRODUCT_OFF_SALE("2014","商品已经被下架"),

    ORDER_ID_NUM_EMPTY("2015","订单未实名认证"),

    CART_IDS_EMPTY("2016", "购物车id为空"),

    CART_NUM_NOT_MATCH("2017", "购物车数量不匹配"),

    MAIN_ORDER_NOT_EXISTS("2018", "订单不存在"),

    PAY_TIME_EPIRED("2019", "支付时间过期"),

    GENERATE_MINIPAY_PARAM_FAIL("2020", "生产支付参数异常"),

    ORDER_STATUS_ERROR("2021", "订单状态错误"),

    ORDER_PAY_LOG_STATUS_ERROR("2022", "支付单状态错误"),

    REAL_NAME_PRODUCT_NOT_MATCH_CERT("2023", "实名商品订单对应的实名信息不匹配"),

    ZYB_NO_NOT_EXSTS("2024", "智游宝商品编号不存在"),

    TOURIST_EXSITS("2025", "游客已经存在"),

    TOURIST_NOT_EXSITS("2026", "游客不存在"),

    SUB_ORDER_NOT_EXISTS("2027", "子订单不存在"),

    ORDER_CONTAIN_REFUND_ORDER("2028", "主订单包含已审核通过退款订单，不能再整单退款"),

    ORDER_CAN_REFUND_NUM_ZERO("2027", "订单没有可退数量"),

    REFUND_SUBORDER_REQ_LIST_EMPTY("2028", "退票子订单数量为0"),

    SUB_ORDER_NUM_NOT_ENOUGH("2029", "子订单可退数量不足"),

    ZYB_NOTIFY_LOG_NOT_EXISTS("2029", "智游宝通知消息不存在"),

    ORDER_PAY_LOG_NOT_EXISTS("2030", "支付单状态错误"),

    USER_NOT_EXISTS("2031", "用户不存在"),

    PRODUCT_CATEGORY_NOT_EXISTS("2032", "商品分类不存在"),

    PRODUCT_CATEGORY_NAME_EXISTS("2033", "商品分类名称已存在"),

    TOURIST_NOTE_NOT_EXISTS("2034", "游记不存在"),

    TOURIST_NOTE_AUDIT_SUCCESS("2035", "游记审核成功，不能修改"),

    TOURIST_NOTE_MEMBER_NOT_MATCH("2035", "游记信息不匹配，不能修改"),

    TOURIST_NOTE_FILE_EMPTY("2036", "请删除游记图片或游记视频"),

    TOURIST_NOTE_IMAGE_NOT_EXISTS("2037", "游记图片或游记视频不存在"),

    TRAVEL_DAY_LESS_TODAY("2038", "旅行日期小于今天"),

    PRODUCT_SKU_NOT_EXISTS("2039", "商品规格不存在"),

    PRODUCT_SKU_SIZE_ERROR("2039", "商品规格数量不对"),

    PRODUCT_NUM_NOT_MATCH("2040", "商品数量不匹配"),

    INVALID_ID_CARD_NO("2041", "身份证证件号码不匹配"),

    SYNC_ZYB_STATUS_ERROR("2042", "同步智游宝状态不匹配"),

    CART_NUM_OUT_MAX("2043", "购物车数量大于最大值"),

    INVALID_FULL_REFUND_FLAG("2044", "退票类型错误"),

    FILE_NOT_EXISTS("2045", "文件不存在"),

    GENERATE_THUMBNAIL_IMAGE_FAIL("2046", "生成缩略图失败"),

    NO_SUBORDER_REFUNDED("2047", "当前订单中没有可以退款的商品"),

    RETURN_NUM_OUT_TOTAL_NUM("2048", "退票数量超过总票数"),

    ID_CARD_NO_EXISTS("2049", "身份证证件号码已存在"),

    REFUND_ORDER_SYNC_ZYB_FAIL("2050", "退票申请失败，请联系客服"),

    ORDER_CONTACTOR_EMPTY("2051", "请填写下单联系人身份信息"),

    PRODUCT_CAN_NOT_RETURN("2052", "已购商品不可退"),

    PRODUCT_RULE_NOT_EXISTS("2053", "商品购买规则不存在"),

    PRODUCT_RULE_BUY_START_TIME_FAIL("2054", "商品购买时间还未开始"),

    PRODUCT_RULE_BUY_END_TIME_FAIL("2055", "商品购买时间已结束"),

    OUTER_PRODUCT_MAX_BUY_NUM("2056", "购买商品超过最大限购数量"),

    VISIT_DAY_CAN_NOT_TODAY("2057", "不能选择当天作为入园游玩日期"),


    PRODUCT_RULE_VISIT_START_TIME_FAIL("2058", "游览日期不能小于票务限定的最小日期"),

    PRODUCT_RULE_VISIT_END_TIME_FAIL("2059", "游览日期不能大于票务限定的最大日期"),

    PAGE_CONFIG_INFO_NOT_EXISTS("2060", "配置页面信息不存在"),

    CAMPAIGN_CODE_EXISTS("2061", "活动code已经存在"),

    CAMPAIGN_NOT_EXISTS("2062", "活动不存在"),

    CAMPAIGN_INVALID("2063", "活动不可用"),

    SA_NOT_EXISTS("2064", "分销员不存在"),

    MEMBER_ORGNIZATION_REAPEAT("2065", "组织信息已被其他用户绑定"),

    SA_INFO_NOT_MATCH("2066", "组织信息有误"),

    MEMBER_ALREADY_CANCELLATION("2067", "会员已经注销"),

    SA_CODE_EXISTS("2068", "分销员 code 已经存在"),

    CAMPAIGN_ENDTIME_ERROR("2069", "活动结束时间不能小于当前时间"),

    MEMBER_CAN_NOT_BIND_SELF("2070", "顾客不能绑定的sa为自己"),

    VISIT_DAY_NOT_TODAY("2071", "当天购的票，游览日期必须是当天"),

    UNKNOWN_ERROR("9999", "系统繁忙，请稍后再试....");
    private String code;
    private String message;


    ErrorCode(String errCode, String errMsg) {
        this.code = errCode;
        this.message = errMsg;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
